import axios from '@/libs/api.request'

// 添加老师
export const addTeacher = (data) => {
  return axios.request({
    url: '/admin/teacher/add',
    data,
    method: 'post'
  })
}

// 修改老师
export const updateTeacher = (data) => {
  return axios.request({
    url: '/admin/teacher/update',
    data,
    method: 'post'
  })
}

// 删除老师
export const deleteTeacher = (id) => {
  return axios.request({
    url: `/admin/teacher/delete/${id}`,
    method: 'get'
  })
}

// 老师列表
export const teacherList = (data) => {
  return axios.request({
    url: '/admin/teacher/page/list',
    data,
    method: 'post'
  })
}
